<template>
  <h1>开关组件</h1>
  <el-switch v-model="value2" style="--el-switch-on-color: green;--el-switch-off-color:grey "></el-switch>
  <el-switch v-model="value3" :active-value="1" :inactive-value="0"></el-switch>
  <el-switch v-model="value4" :active-value="'1'" :inactive-value="'0'"></el-switch>
  <el-switch v-model="value4" active-value="1" inactive-value="0"></el-switch>
</template>

<script setup>
  import {ref} from "vue";

  const value2 = ref(true);
  const value3 = ref(true);
  const value4 = ref('0');
</script>

<style scoped>

</style>